package cn.iocoder.ny.module.mall.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonRawValue;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;


@Data
@TableName("mall_config")
public class MallConfig implements Serializable {

    // 商城编号
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 租户id
     */
    @TableField(value = "tenant_id")
    private Long tenantId;


    /**
     * 商家小程序的appid
     */
    @NotBlank(message = "appid不能为空", groups = {Add.class})
    private String appid;

    /**
     * 小程序密钥（需加解密）
     */
    @NotBlank(message = "secret不能为空", groups = {Add.class})
    private String secret;

    /**
     * 主题色
     */
    private String primaryColor;

    /**
     * 支付商户id
     */
//    @NotBlank(message = "支付商户id不能为空", groups = {Add.class})
    private String mchId;


    /**
     * 支付商户序列号（需加解密）
     */
//    @NotBlank(message = "支付商户序列号不能为空", groups = {Add.class})
    private String mchSerialNumber;

    /**
     * 支付商户apiv3秘钥（需加解密）
     */
//    @NotBlank(message = "支付商户apiv3秘钥不能为空", groups = {Add.class})
    private String apiV3Key;

    /**
     * 支付商户私钥（需加解密）
     */
//    @NotBlank(message = "支付商户私钥不能为空", groups = {Add.class})
    private String privateKey;


//    @NotBlank(message = "阿里云短信签名不能为空", groups = {Add.class})
    private String aliSmsSignName;

//    @NotBlank(message = "阿里云短信模板不能为空", groups = {Add.class})
    private String aliTemplateCode;

//    @NotBlank(message = "阿里云accessKeyId不能为空", groups = {Add.class})
    private String aliAccessKeyId;

//    @NotBlank(message =  "阿里云aliAccessKeySecret不能为空", groups = {Add.class})
    private String aliAccessKeySecret;

    /**
     * 店铺名称
     */
//    @NotBlank(message = "店铺名称不能为空", groups = {Add.class})
    private String mallName;

    /**
     * 店铺介绍
     */
//    @Max(value = 10, message = "店铺介绍不能超过10个字符", groups = {Add.class})
    private String mallIntroduce;

    /**
     * 店铺联系电话
     */
//    @NotBlank(message = "店铺联系电话不能为空", groups = {Add.class})
    private String mallMobile;

    /**
     * 店铺地址【经度 ，纬度，详细地址，兴趣点】
     */
//    @NotBlank(message = "店铺地址不能为空", groups = {Add.class})

    /**
     * 店铺所在城市
     */
//    @NotBlank(message = "店铺所在城市不能为空", groups = {Add.class})
    private String cityName;

    @TableField(value = "private_key_path")
    private String privateKeyPath;

    @TableField(value = "status")
    private Integer status;

    @TableField(value = "mall_avatar")
    private String mallAvatar;

    @TableField(value = "address")
    private String address;

    @TableField(value = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @TableField(value = "update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;

    @TableField(value = "a_id")
    private Long aId;
    @TableField(value = "p_id")
    private Long pId;

    private static final long serialVersionUID = 1L;

    public interface Add {
    }
    public interface Update {
    }
    public interface Del {
    }
    public interface Query {
    }

}

